package java_design_model.com.observer;

import java.util.Observable;

public class Data_source extends Observable{
	public int getA() {
		return a;
	}

	public int getB() {
		return b;
	}

	private int a;
	private int b;

	public Data_source() {
		
	}
	public void setData(int a,int b) {
		this.a=a;
		this.b=b;
		changData();
	}
	public void changData() {
		setChanged();
		notifyObservers(new Data(getA(),getB()));
	}
	public class Data {
		public int a;
		public int b;
		public Data(int a, int b) {
			super();
			this.a = a;
			this.b = b;
		}

	}

}
